/**
 * 功能说明：路由配置，声明示例页面与导航关系。
 */
import { createRouter, createWebHistory } from 'vue-router'

const Login = () => import('../views/Login.vue')
const Users = () => import('../views/Users.vue')
const FormDemo = () => import('../views/FormDemo.vue')
const Files = () => import('../views/Files.vue')

const routes = [
  { path: '/', redirect: '/users' },
  { path: '/login', name: 'login', component: Login },
  { path: '/users', name: 'users', component: Users },
  { path: '/form', name: 'form', component: FormDemo },
  { path: '/files', name: 'files', component: Files }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router